# Makefile - Makefile for target/config/kontron_ktus
#
# Copyright (c) 2010 Wind River Systems, Inc.
#
# Copyright 2010 Kontron Modular Computers GmbH
#
# modification history
# --------------------
# 01b,10aug10,shu  adjusted to Kontron KTUS board
# 01a,30apr10,rbc  created based on itl_crownbeach/Makefile	(01a)
#

CPU        = PENTIUM4
TOOL       = diab

TGT_DIR = $(WIND_BASE)/target

include $(TGT_DIR)/h/make/defs.bsp

# Only redefine make definitions below this point, or your definitions will
# be overwritten by the makefile stubs above.

TARGET_DIR   = kontron_ktus
VENDOR       =
BOARD        = Kontron KTUS15
KONTRON_DIR  = $(WIND_BASE)/target/config/kontron_ktus/kontron


#
# The constants ROM_TEXT_ADRS, ROM_SIZE, are defined
# in config.h, MakeSkel, Makefile, and Makefile.*
# All definitions for these constants must be identical.
#

# ifdef BOOTCODE_IN_RAM
ROM_TEXT_ADRS      = 00008000   # ROM entry address - A: or C:
ROM_SIZE           = 00090000   # number of bytes of ROM space
# else
# ROM_TEXT_ADRS    = fff20000   # ROM entry address - EPROM
# ROM_SIZE         = 0007fe00   # number of bytes of ROM space
# endif

RAM_LOW_ADRS       = 00408000   # VxWorks image entry point
RAM_HIGH_ADRS      = 04008000   # Boot image entry point

EXTRA_DEFINE    = -DFAST_REBOOT

EXTRA_INCLUDE     += $(subst $(DIRCHAR),/,-I$(KONTRON_DIR)/h)
EXTRA_INCLUDE     += $(subst $(DIRCHAR),/,-I$(KONTRON_DIR)/src)

LIB_EXTRA         = libkontron_ktus.a

RELEASE        += bootrom.bin

RELEASE        += bootrom.pxe

bootrom.pxe: bootrom.bin pxeBoot.bin
	cat pxeBoot.bin bootrom.bin > bootrom.pxe

# Only redefine make definitions above this point, or the expansion of 
# makefile target dependencies may be incorrect.

include $(TGT_DIR)/h/make/rules.bsp

LOCAL_DRIVERS = halK.html \
		vxbMC146818RtcK.html \
		vxbW83627dhgK.html

localdocs: $(LOCAL_DRIVERS)

%.html: %.c
	apigen -mg -nostrict -config bsp2html -missingok \
		-book VxWorks_APIs -chapter BSP_APIs -category kontron_ktus \
		-out .. $(subst .html,.c,$@)

